package com.yima.baseproj.module.sys.student;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yima.baseproj.module.sys.student.model.StudentSelectModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StudentMapper extends BaseMapper<StudentEntity> {
    /**
     * 分页+模糊查询
     * @param page
     * @param searchVo
     * @return
     */
    Page<Map> findBySearchVo(@Param("page")Page page, @Param("searchVo") StudentEntity searchVo);

    Page<Map> findByKgId(@Param("kgId") int kgId,@Param("page")Page page, @Param("searchVo") StudentEntity searchVo);

    List<Map> findBySearchVo(@Param("searchVo") StudentEntity searchVo);

    List<StudentSelectModel> findStuByKgId(@Param("kgId") int kgId);
    List<StudentSelectModel> findStuList();

    List<StudentSelectModel> findAllByClassId(@Param("classId")int classId);
    List<StudentSelectModel> sysStudentFindBystuName(@Param("studentName")String studentName);

    StudentSelectModel findStudentById(int id);

}